A switching network in the prior art can provide unicast services and multicast services. The unicast services are point-to-point services, for example, an Internet access service is a common unicast service. The multicast services are point-to-multipoint services, and common multicast services include an Internet Protocol Television (IPTV) service and a Layer 2 multipoint Virtual Private Network (VPN) service, such as a Virtual Private Lan Service (VPLS) service. As the multicast services gradually rise, it becomes a hot research spot.
Take the IPTV service as an example. When multicast packets are forwarded, one channel represents one multicast data stream and one multicast data stream is indicated by one Multicast Group Identifier (MID). Viewers who watch the channels (may be called “multicast group members”) may be different, the viewers are connected to different physical ports of a network device, and the network device forwards in distinction each multicast data stream in order to avoid wasting bandwidth. For example, if the physical port is the one indicated by the MID, a multicast packet is sent to the physical port; otherwise, no multicast packet is sent to the physical port.
The prior art provides a method for implementing multicast packet forwarding by a two-stage replication technology using the same MID. After receiving a multicast packet, a line card obtains the MID of the multicast packet by looking up a table, and then the line card sends the multicast packet together with the MID to a switch fabric card. The switch fabric card performs first stage replication, in which the switch fabric card uses the MID as an index to look up a multicast replication table saved therein, obtains line cards corresponding to the multicast packet, and sends the multicast packet and the MID to the line cards. The line cards perform second stage replication, in which the line cards use the MID as an index to look up a multicast replication table saved therein, obtain physical ports corresponding to the multicast packet, and send the multicast packet to each physical port indicated by the MID.
In the implementation of the present invention, the inventor finds that the prior art at least has the following problems. In the current multicast services, the required number of the multicast groups is increasingly growing, for example, up to 1 M (million) multicast groups. At this time, the capacity of a multicast replication table saved by a switch fabric card also becomes increasingly larger. For example, in a system with 1 M multicast groups and 64 line cards, the required capacity of the multicast replication table is 1 M*64 bit=64 Mbit. However, the storage capacity of the switch fabric card is merely tens of K, which can hardly meet the requirement, thus failing to implement multicast packet forwarding.